package com.zhny.aiot.zx.fertilizer.ic.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class FertilizerIcStoreEntry extends StoreEntity {
    @PropertyValue(alias = "压力",description = "压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String pressure;
    @PropertyValue(alias = "流量",description = "流量",unit = "m3/h",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String flow;

    @PropertyValue(alias = "液位",description = "液位",unit = "m",icon=IconConstract.WaterLevel,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String liquidLevel;

    @PropertyValue(alias = "压力状态",description = "压力状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String pressureStatus;

    @PropertyValue(alias = "流量状态",description = "流量状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String flowStatus;
    @PropertyValue(alias = "液位状态",description = "液位状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String liquidLevelStatus;
    @PropertyValue(alias = "工作状态",description = "工作状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String workStatus;

    @PropertyValue(alias = "电源状态",description = "电源状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String powerStatus;

    @Override
    public String toString(){
        StringBuilder builder = new StringBuilder ();
        builder.append ("flow:");builder.append (flow);builder.append (";");
        builder.append ("pressure:");builder.append (pressure);builder.append (";");
        builder.append ("liquidLevel:");builder.append (liquidLevel);builder.append (";");
        builder.append ("pressureStatus:");builder.append (pressureStatus);builder.append (";");
        builder.append ("liquidLevelStatus:");builder.append (liquidLevelStatus);builder.append (";");
        builder.append ("flowStatus:");builder.append (flowStatus);builder.append (";");
        builder.append ("workStatus:");builder.append (workStatus);builder.append (";");
        builder.append ("powerStatus:");builder.append (powerStatus);builder.append (";");

        return builder.toString ();
    }

}
